<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><c:out value="${context.platform4}" />-<c:out
	value="${context.title}" /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">
<script>
function switchCalendar(directoryID){
 
	var currentCalendar=document.getElementById("currentCalendar");
	currentCalendar.src='/group/event${context.postfix}?directoryID='+directoryID; 

	var calendarTable=document.getElementById("calendarTable");
	var tds=calendarTable.getElementsByTagName('td');
	for(var i=0;i<tds.length;i++){
		tds[i].style.background="#ffffff";
		tds[i].style.color="#808080";
	}

	var td=document.getElementById("td"+directoryID);
	td.style.background="#005EAC";
	td.style.color="white";
}


</script>


</head>

<body bottomMargin=0 leftMargin=10 topMargin=0 rightMargin=10
	marginheight="0">
<c:import url="/group/ui-component/divdialog/divdialog.html" />
<table  align=center width=100% cellspacing=0 cellpadding=0 style="border:0px solid #d2d4d2">
<tr>
						<td width=100%  
							style=" border-bottom: 1px solid #d2d2d4"><a href="/group/reminders${context.postfix }" style="font-size: 13px;  color: #808080;"><b><c:out
							value="${context.platform4 }" /></b></a>  </td>
					</tr>
	<tr>
		<td>
		<table id='calendarTable'>
			<c:if test="${not empty param.directoryID }">
				<c:set var="currentDirectoryID" value="${parma.directoryID }" />
			</c:if>
			<c:set var="dirCount" value="0" />
			<c:forEach var="dir" items="${directories }">
				<c:if test="${empty param.directoryID && dirCount==0 }">
					<c:set var="currentDirectoryID" value="${dir.id }" />
				</c:if>
				<c:if test="${dirCount%6==0 }">
					<tr>
				</c:if>
				<td align=center id='td${dir.id}'   nowrap width=140 style="cursor: pointer;"
					onclick="switchCalendar('${dir.id}')">${dir.name }</td>
				<c:if test="${dirCount%6==5 }">
					</tr>
				</c:if>
				<c:set var="dirCount" value="${dirCount+1 }" />
			</c:forEach>

		</table>
		</td>
	</tr>
	<tr>
		<td width=100%>
		<table style="  width: 100%;" align=center cellspacing=0 cellpadding=0>

			<tr>
				<td width=100% align=center><Iframe id=currentCalendar
					style="width: 100%;"
					src=""
					height="480" scrolling="no" frameborder="0"></iframe></td>
			</tr>
		</table>
 
		</td>
	</tr>
</table>
<script>switchCalendar('${currentDirectoryID}')</script>
</body>
</html>

